package master.photo.domain

import master.photo.domain.security.AppUser;

import master.photo.domain.PhotoAlbum;

class Profile {
	
	Long id;
	
	String fullname;
	String bio;
	String homepage;
	byte[] photo;
	
	static belongsTo = AppUser;
	static hasMany = [photoAlbums: PhotoAlbum];
	
	static constraints = {
		fullname(blank: false)
		bio(nullable: true, maxSize: 1000)
		homepage(url: true, nullable: true)
		photo(nullable: true)
	}
	
	@Override
	public String toString() {
		fullname;
	}
	
}
